using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Coronary_angiographyMap : EntityTypeConfiguration<Coronary_angiography>
    {
        public Coronary_angiographyMap()
        {
            // Primary Key
            this.HasKey(t => t.CA_ID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.CA_Catheter)
                .HasMaxLength(80);

            this.Property(t => t.CA_Coronary_artery_edge)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.CA_Coronary_Cae_detail)
                .HasMaxLength(100);

            this.Property(t => t.CA_Coronary_Distributed)
                .HasMaxLength(50);

            this.Property(t => t.CA_Bypass_graft)
                .HasMaxLength(100);

            this.Property(t => t.CA_Is_supply_vessels)
                .HasMaxLength(100);

            this.Property(t => t.CA_Graft_disease_location)
                .HasMaxLength(50);

            this.Property(t => t.CA_Angiography_diagnosis)
                .HasMaxLength(50);

            this.Property(t => t.CA_IS_graft)
                .HasMaxLength(2);

            this.Property(t => t.CA_CureSuggest)
                .HasMaxLength(50);

            this.Property(t => t.CA_LesionTrait)
                .HasMaxLength(250);

            // Table & Column Mappings
            this.ToTable("Coronary_angiography");
            this.Property(t => t.CA_ID).HasColumnName("CA_ID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.CA_Catheter).HasColumnName("CA_Catheter");
            this.Property(t => t.CA_Coronary_artery_edge).HasColumnName("CA_Coronary_artery_edge");
            this.Property(t => t.CA_Coronary_Cae_detail).HasColumnName("CA_Coronary_Cae_detail");
            this.Property(t => t.CA_Coronary_Distributed).HasColumnName("CA_Coronary_Distributed");
            this.Property(t => t.CA_Bypass_graft).HasColumnName("CA_Bypass_graft");
            this.Property(t => t.CA_Is_supply_vessels).HasColumnName("CA_Is_supply_vessels");
            this.Property(t => t.CA_Graft_disease_location).HasColumnName("CA_Graft_disease_location");
            this.Property(t => t.CA_Angiography_diagnosis).HasColumnName("CA_Angiography_diagnosis");
            this.Property(t => t.CA_IS_graft).HasColumnName("CA_IS_graft");
            this.Property(t => t.CA_CureSuggest).HasColumnName("CA_CureSuggest");
            this.Property(t => t.CA_LesionTrait).HasColumnName("CA_LesionTrait");
        }
    }
}
